package business.GUIFacade.projFile;

import business.builder.projFile.CProjFileBuilder;
import business.builder.projFile.JavaProjFileBuilder;
import business.builder.projFile.IProjFileBuilder;
import business.builder.projFile.TxtProjFileBuilder;
import java.util.HashMap;
import models.ProjFile;

public class NewProjFileGUIFacade {

    private IProjFileBuilder builder;

    public NewProjFileGUIFacade(String title, String type, HashMap<Integer, ProjFile> filesList) {
        switch (type) {
            case "C":
                builder = new CProjFileBuilder();
                break;
            case "Java":
                builder = new JavaProjFileBuilder();
                break;
            case "Text":
                builder = new TxtProjFileBuilder();
                break;
        }
        builder.buildTitle(title);
    }

    public ProjFile getProjFile() {
        return builder.getProjFile();
    }

    // In case you need some access to the ProjFile, use builder.getProjFile().[...].
}
